<?php
//$section->appendSystemModule('right_sidebar', array('name'=>'events.AllEventFilters'));
?>
<?php $html->css('/events/css/events.css',null,array(),false);?>
<div id="my_events_block">
	<?php
	unset($paginator->Html);
	$paginator->Html = $appHtml;
	$paginator->options(array('url'=>$this->getPagingUrl()));
	if(!empty($events))
	{
		if(!isset($eventCallerName))
		{
			$eventCallerName = 'myPosted';
		}
	?>
		<div class="clear"></div>
		<div>
			<?php echo $this->element('events', array('eventList' => $events,'view_type'=>$view_type,'eventCallerName'=>$eventCallerName,'loggedInUserId'=>$loggedInUserId)); ?>
		</div>
		<div class="clear"></div>
		<div class='paginate'>
			<?php echo $paginator->prev(__('Prev'));?>
			<?php echo $paginator->numbers(array('separator'=>' '));?>
			<?php echo $paginator->next(__('Next'));?>
		</div>
		<div class="clear"></div>
	<?php 
	}
	else
	{
		echo "<h4 class='no_results'>".__('No events found!')."</h4>";
	}
	?>
</div>
<div class="clear"></div>
<?php $javascript->link('/cms/js/jquery.ajaxify.js',false); ?>
<script type="text/javascript">
$(document).ready(function()
{
	makeAjaxified($('#my_events_block').find('.paginate a'),'my_events_block');
});
</script>